/*************************************************************************
	> File Name: 005.重载()运算符.cpp
	> Author: Maureen 
	> Mail: Maureen@qq.com 
	> Created Time: 五  1/ 7 11:02:51 2022
 ************************************************************************/

#include <iostream>
using namespace std;

class ADD {
public:
    ADD(int c) : c(c) {  }
    int operator()(int a, int b) {
        return a + b + c;
    }
private:
    int c;
};

int main() {
    ADD add(5); //add叫做仿函数或者函数对象
    cout << add(6, 7) << endl; //18
    return 0;
}


